﻿using AIWhitelist;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AIWhitelist.Framework.Utilities;

namespace AIWhitelist.Framework.Common
{
    /// <summary>
    /// 非持久性的全局数据
    /// </summary>
    public class Data : Singleton<Data>
    {

    }

    /// <summary>
    /// 路径信息
    /// </summary>
    [Serializable]
    public class RoutineData
    {
        public int RoutineID { get; set; }
        public string RoutineName { get; set; }
        public List<Location> Locations { get; set; }
    }

    [Serializable]
    public class Location
    {
        public Location()
        {

        }
        public Location(double lo, double la)
        {
            Longitude = lo; Latitude = la;
        }
        public Location(string location)
        {
            var arry = location.Split(',');
            Longitude = double.Parse(arry[0]);
            Latitude = double.Parse(arry[1]);
        }
        /// <summary>
        /// 经度
        /// </summary>
        public double Longitude { get; set; }
        /// <summary>
        /// 纬度
        /// </summary>
        public double Latitude { get; set; }
    }
}
